package com.glsc.ngateway.common.api.flowable.dto.param;

import com.glsc.ngateway.common.api.flowable.dto.demand.ParamSearchDtoBuilder;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.Serializable;
import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
@Data
@ToString
public class ParamSearchDto implements Serializable {
    //startUser,dealUser,involveUser  三者必选其一
    //如果都不传，则processDefineKey必填
    //其他参数随意，可传可不传

    @ApiModelProperty(value = "流程id")
    private String processId;
    @ApiModelProperty(value = "节点id")
    private String taskId;
    //发起人
    @ApiModelProperty(value = "发起人名称")
    private String startUser;
    //待办人
    @ApiModelProperty(value = "待办人名称")
    private String dealUser;
    @ApiModelProperty(value = "待办人名称")
    private List<String> dealUserList;
    //经手人
    @ApiModelProperty(value = "经手人名称")
    private String involveUser;
    //流程标题
    @ApiModelProperty(value = "流程标题")
    private String title;
    //流程定义中文名称
    @ApiModelProperty(value = "流程定义英文")
    private String processDefineKey;
    @ApiModelProperty(value = "流程定义英文集合")
    private List<String> processDefineKeyList;
    //三方系统名称 amprod
    @ApiModelProperty(value = "第三方系统名称")
    private String sysid;

    @ApiModelProperty(value = "起始时间")
    private String beginDate;
    @ApiModelProperty(value = "结束时间")
    private String endDate;
    @ApiModelProperty(value = "流程列表")
    private List<String> processIdList;
    @ApiModelProperty(value = "是否结束，0未结束，1已结束")
    private String hasProcessEnd;

    @ApiModelProperty(value = "是否结束，0未结束，1已结束")
    private Boolean archived;


    public ParamSearchDto(ParamSearchDtoBuilder builder) {
        this.processId = builder.getProcessId();
        this.taskId = builder.getTaskId();
        this.startUser = builder.getStartUser();
        this.dealUser = builder.getDealUser();
        this.involveUser = builder.getInvolveUser();
        this.title = builder.getTitle();
        this.processDefineKey = builder.getProcessDefineKey();
        this.sysid = builder.getSysid();
        this.beginDate = builder.getBeginDate();
        this.endDate = builder.getEndDate();
        this.hasProcessEnd = builder.getHasProcessEnd();
        this.archived = builder.getArchived();
    }
}
